/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.base.entity.supplier;

import javax.validation.constraints.NotBlank;
import org.hibernate.validator.constraints.Length;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

/**
 * 供应商Entity
 * @author LV
 * @version 2021-03-01
 */
@Table(name="t_supplier_contact_info", alias="a", columns={
		@Column(name="contact_id", attrName="contactId", label="联系方式ID", isPK=true),
		@Column(name="contact_name", attrName="contactName", label="姓名", queryType=QueryType.LIKE),
		@Column(name="position", attrName="position", label="职位"),
		@Column(name="phone", attrName="phone", label="电话号码"),
		@Column(name="email", attrName="email", label="电子邮箱"),
		@Column(name="supplier_id", attrName="supplierId.supplierId", label="供应商ID"),
	}, orderBy="a.contact_id ASC"
)
public class SupplierContactInfo extends DataEntity<SupplierContactInfo> {
	
	private static final long serialVersionUID = 1L;
	private String contactId;		// 联系方式ID
	private String contactName;		// 姓名
	private String position;		// 职位
	private String phone;		// 电话号码
	private String email;		// 电子邮箱
	private Supplier supplierId;		// 供应商ID 父类
	
	public SupplierContactInfo() {
		this(null);
	}


	public SupplierContactInfo(Supplier supplierId){
		this.supplierId = supplierId;
	}
	
	public String getContactId() {
		return contactId;
	}

	public void setContactId(String contactId) {
		this.contactId = contactId;
	}
	
	@NotBlank(message="姓名不能为空")
	@Length(min=0, max=100, message="姓名长度不能超过 100 个字符")
	public String getContactName() {
		return contactName;
	}

	public void setContactName(String contactName) {
		this.contactName = contactName;
	}
	
	@NotBlank(message="职位不能为空")
	@Length(min=0, max=100, message="职位长度不能超过 100 个字符")
	public String getPosition() {
		return position;
	}

	public void setPosition(String position) {
		this.position = position;
	}
	
	@NotBlank(message="电话号码不能为空")
	@Length(min=0, max=100, message="电话号码长度不能超过 100 个字符")
	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}
	
	@Length(min=0, max=100, message="电子邮箱长度不能超过 100 个字符")
	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}
	
	@Length(min=0, max=64, message="供应商ID长度不能超过 64 个字符")
	public Supplier getSupplierId() {
		return supplierId;
	}

	public void setSupplierId(Supplier supplierId) {
		this.supplierId = supplierId;
	}
	
}